package com.haixiaoke.saas.house.domain;

import com.haixiaoke.saas.common.utils.TreeUtil.ITree;
import lombok.Data;

/**
 * 房屋树对象
 *
 * @author qixi
 * @date 2023/10/25
 */
@Data
public class EstateTree extends ITree<String> {

    /**
     * 名称
     */
    private String name;


    /**
     * 级别1楼盘 2楼栋 3单元 4楼层
     */
    private Integer level;

    /**
     * 楼层数
     */
    private Integer floors;

    @Override
    protected boolean firstLevel() {
        return level == 1;
    }

    public EstateTree(String id, String name, String parentId, Integer sort, Integer level, Integer floors) {
        super(id, parentId, sort, null);
        this.name = name;
        this.level = level;
        this.floors = floors;
    }

    public EstateTree() {
    }


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getLevel() {
        return level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    public Integer getFloors() {
        return floors;
    }

    public void setFloors(Integer floors) {
        this.floors = floors;
    }
}
